package com.example.wan1.view.todo;

import com.example.wan1.R;
import com.example.wan1.adapter.TodoAdapter;
import com.example.wan1.di.ano.ActivityScope;
import com.example.wan1.model.TodoBean;

import java.util.ArrayList;
import java.util.List;

import dagger.Binds;
import dagger.Module;
import dagger.Provides;

/***
 * @Author: zxd
 * @CreateDate: 2020/8/26 13:31
 * @Description: todo界面
 */
@Module
public abstract class TodoModule {

    @Binds
    abstract TodoContract.View todoView(TodoActivity todoActivity);

    @ActivityScope
    @Provides
    static TodoAdapter provideAdapter(List<TodoBean> mList) {
        return new TodoAdapter(R.layout.todo_item, mList);
    }

    @ActivityScope
    @Provides
    static List<TodoBean> provideList() {
        return new ArrayList<>();
    }
}
